package com.tensquare.recruit.rest;


import com.tensquare.entity.Result;
import com.tensquare.entity.StatusCode;
import com.tensquare.recruit.service.EnterpriseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**\
 * 单位
 */
@RestController
@RequestMapping("enterprise")
public class EnterpriseRest {

    @Autowired
    private EnterpriseService enterpriseService;

    /**
     * http://localhost:9002/enterprise/hotlist/1
     * @param ishot
     * @return
     */
    @RequestMapping(value = "/hotlist/{ishot}", method = RequestMethod.GET)
    public Result hotlist(@PathVariable("ishot") String ishot){

        return new Result(true, StatusCode.OK, "查询成功", enterpriseService.hotlist(ishot));
    }
}
